import { EntityModel } from '@midwayjs/orm';
import { BaseEntity } from 'midwayjs-cool-core';
import { Column, PrimaryGeneratedColumn } from 'typeorm';

@EntityModel('mall_order')
export class MallOrderEntity extends BaseEntity {
  @PrimaryGeneratedColumn()
  id: number;

  // @Column({ comment: '所属店铺' })
  // store: number;

  @Column({ comment: '商品 id' })
  productId: number;

  @Column({ comment: 'sku id' })
  skuId: number;

  @Column({ comment: '单价' })
  price: number;

  @Column({ comment: '数量' })
  count: number;

  @Column({
    type: 'enum',
    enum: ['待付款', '待发货', '待收货', '待评价'],
    comment: '状态',
  })
  status: string;

  @Column({ comment: '付款时间', nullable: true })
  payTime: Date;

  @Column({ comment: '发货时间', nullable: true })
  sendTime: Date;

  // 物流信息
}
